#include<bits/stdc++.h>
#define XH(i,a,b) for(int i=a;i<b;++i)
#define XXH(i,a,b) for(int i=a-1;i>=b;--i)
#define LL long long
using namespace std;
int tmpINT; string tmpSTRING; char tmpCHAR; double tmpDOUBLE; LL tmpLONGLONG;

void solve(){
    int n;scanf("%d", &n);
    int yu = n%2020;
    int cnt = n/2020;
    if(yu<=cnt){
        cout<<"YES"<<endl;
    }else{
        cout<<"NO"<<endl;
    }
}

int main(){
    int t;scanf("%d", &t);
    for (int i = 0 ; i < t ; ++i)
    {
        solve();
    }

    return 0;
}
